﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MaxLeaf.Platform.Contract;
using MaxLeaf.Platform.BLLImplementation;
using CommonsLib.Utility;
using MaxLeaf.Platform.DataContract;
using CommonsLib.Settings;
using MaxLeaf.Platform.Functions;

namespace MaxLeaf.Platform.BLLProxy
{
    public class CategroyApproBLLProxy : BaseBLLProxy, ICategroyAppro  
    {
        ICategroyAppro _bll;
        private ICategroyAppro BLL
        {
            get
            {                
                return _bll;
            }
        }
        public CategroyApproBLLProxy()
            : base()
        {
            switch ( Access_Mode )
            {

                case MaxLeaf.Platform.Commons.Const.ACCESS_Direct:
                    {
                        _bll = new CategroyApproBLLProxy();
                        break;
                    }

                case MaxLeaf.Platform.Commons.Const.ACCESS_IIS:
                    {
                        _bll = new CategroyApproBLLWCFClient(this.WCF_Configs);
                        break;
                    }


                default:
                    {
                        throw new MaxLeaf.Platform.Commons.MaxLeafException(MaxLeaf.Platform.Commons.Const.EXCEPTION_MESSAGE_INVALID_ACCESSMODE_CONFIG);

                    }
            }
        }

        #region ICategroyAppro 成员

        public CategroyApproDataModel Confirm(CategroyApproDataModel model)
        {
            return BLL.Confirm(model);
        }

        #endregion

        #region ICategroyAppro 成员


        public CategroyApproDataModel UnConfirm(CategroyApproDataModel model)
        {
            return BLL.UnConfirm(model); 
        }

        #endregion

        #region ICategroyAppro 成员


        public CategroyApproDataModel DepartApproval(CategroyApproDataModel model)
        {
            return BLL.DepartApproval(model); 
        }

        #endregion
    }
}
